package com.zret.oasys.dao;

import com.zret.oasys.dbtools.PageData;
import com.zret.oasys.entity.Leavedetails;
import com.zret.oasys.entity.Leavetable;

public interface LeaveDao {
	// 创建请假表与审批单
	public boolean addLeave(Leavetable leavetable, Leavedetails leavedetails);
	// 按照时间查找某员工的所有审批单子
	public PageData<Leavedetails> getAllLeavedetails(int empid, int page, int pageSize);
	// 通过流水号获取请假表
	public Leavetable getLeavetableByNum(String leavenum);
	// 获取未审批的请假, 按照时间排序
	public PageData<Leavedetails> getNotApprovedLeavedetails(int empid, int page, int pageSize);
	// 获取已审批的请假单, 按照时间排序
	public PageData<Leavedetails> getApprovedLeavedetails(int empid, int page, int pageSize);
	// 查全部, 需要根据员工姓名模糊查询
	public PageData<Leavedetails> getAllLeavemsgByName(int empid, int page, int pageSize, String empname);
	// 查已审批, 需要根据员工姓名模糊查询
	public PageData<Leavedetails> getApprovalLeavemsgByName(int empid, int page, int pageSize, String empname);
	// 查未审批, 需要根据员工姓名模糊查询
	public PageData<Leavedetails> getNotApprovalLeavemsgByName(int empid, int page, int pageSize, String empname);
	// 审批通过的操作
	public boolean leaveApprol(String leavenum, int detailid, String comment);
	// 查找个人的请假信息申请
	public PageData<Leavetable> getMyselfLeaveMsg(int empid, String searchtype, int page, int pageSize);
	// 通过流水号查找审批单
	public Leavedetails getLeavedetailsByNum(String leavenum);
}
